<h1>{L_title}
<!-- OPTION value_name -->
: {value_name}
<!-- END OPTION value_name -->
</h1>
<div id="action">
<a href="{video_list}" title="{L_back_list}">{L_back_list}</a> 
<!-- OPTION video_delete -->
<a href="javascript:confirmation('{video_delete}');" title="{L_delete}"><img src="../tpl_image/button_drop.png" border="0" alt="{L_delete}" /></a>
<!-- END OPTION video_delete -->
</div>


<!-- OPTION L_message -->
<p class="message">{L_message}</p>
<!-- END OPTION L_message -->
				  
<!-- OPTION erreur -->
<div id="erreur">
<p class="erreur-title">{L_erreur}</p>
<ol class="erreur">  
<!-- LOOP erreur -->
<li>{message}</li>
<!-- END LOOP erreur -->
</ol>
</div>
<!-- END OPTION erreur -->

<!-- OPTION show_form -->
<p class="field_required">* {L_field_required}</p>
<form name="form_video" action="{form_action}" method="post" id="formulaire">
  <table>
    <tr> 
      <th class="field_required">{L_catid} *</th>
      <td>
          <select name="catid">
            <!-- LOOP videocat -->
              <option value="{id}">{name}</option>
            <!-- END LOOP videocat -->
          </select>
      </td>
    </tr>
    <tr> 
      <th class="field_required">{L_name} *</th>
      <td><input name="name" type="text" value="{value_name}" size="40"> </td>
    </tr>
    <tr> 
      <th class="field_required">{L_url} *</th>
      <td>
          <input name="url" id="url" type="text" value="{value_url}" size="40"><a href="#video" id="appercu_video" >Appercu video</a>
          <div class="video" id="video" style="display:none;">
              <iframe id="cibleId" ></iframe>
        </div>
      </td>
    </tr>
    <tr>
      <th valign="top">{L_description}</th>
      <td><textarea name="description" cols="35" rows="4" id="description">{value_description}</textarea></td>
    </tr>
    <tr> 
      <th class="field_required">{L_date} </th>
      <td><input name="date" type="text" id="date" value="{value_date}" size="10"> yyyy-mm-dd </td>
    </tr>
    <tr>
        <th class="field_required">{L_status}*</th>
        <td>
            <!-- LOOP status -->
            <input type="radio" name="status" value="{id}" {checked} /> {name}
            <!-- END LOOP status -->
        </td>
    </tr>	
  </table>
<div id="boutons">
<input type="hidden" name="id" value="{value_id}">
<input type="submit" name="submit" value="{L_valider}" />
</div>  
</form>
<script src="template/fcc/tpl_image/jquery/jquery.js" type="text/javascript"></script>
<script src="template/fcc/tpl_image/jquery/ui/jquery-ui-1.8.20.custom.min.js" type="text/javascript"></script>
<script>
$(function() {
    $('#appercu_video').click(function(){
        var lien = $('#url').val();
        if (lien){
            var reg=new RegExp("[ v=&]+", "g");
            var tableau=lien.split(reg);
            url = "http://www.youtube.com/embed/"+tableau[1];
            if (lien){
                $('#video').show();
                $('#cibleId').attr('src', url) ;
            }
            else{
                $('#video').hide();
            }
        }
    });
    $( "#date" ).datepicker({ dateFormat: "yy-mm-dd" });
});
</script>
<link type="text/css" rel="stylesheet" media="all" href="template/fcc/tpl_image/jquery/ui/css/ui-lightness/jquery-ui-1.8.20.custom.css" />
<!-- END OPTION show_form -->